﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace MrPainter.Scenes
{
    class Menu : BaseScene
    {
        SpriteFont courier20;

        public Menu(ContentManager Content, GameWindow Window): base(Content, Window)
        {
            courier20 = Content.Load<SpriteFont>("CourierNew20");
        }

        public override void Update(GameTime gameTime, KeyboardState keyboard, KeyboardState last_keyboard, MouseState mouse, MouseState mouse_state)
        {
            if (keyboard.IsKeyDown(Keys.B) && !last_keyboard.IsKeyDown(Keys.B))
            {
                Game1.current_state = Game1.GameStates.IN_GAME;
            }
            else if (keyboard.IsKeyDown(Keys.C) && !last_keyboard.IsKeyDown(Keys.C))
            {
                Game1.current_state = Game1.GameStates.INTRO;
            }
            else if (keyboard.IsKeyDown(Keys.Q) && !last_keyboard.IsKeyDown(Keys.Q))
            {
                Game1.current_state = Game1.GameStates.EXIT;
            }
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.DrawString(courier20, "Press B to Begin", new Vector2((Window.ClientBounds.Width / 4 ), Window.ClientBounds.Height / 4), Color.Black);
            spriteBatch.DrawString(courier20, "Press C to view Credits", new Vector2((Window.ClientBounds.Width / 4), Window.ClientBounds.Height/2), Color.Black);
            spriteBatch.DrawString(courier20, "Press Q to Quit", new Vector2((Window.ClientBounds.Width / 4), (Window.ClientBounds.Height * 3/4)), Color.Black);
        }
    }
}
